<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Blogmer Documentation</title>

<style type='text/css' media='all'>@import url('../css/userguide.css');</style>
<link rel='stylesheet' type='text/css' media='all' href='../css/userguide.css' />

<meta http-equiv='expires' content='-1' />
<meta http-equiv= 'pragma' content='no-cache' />
<meta name='robots' content='all' />
</head>
<body>
<!-- START NAVIGATION -->
<div id="nav"><div id="nav_inner"></div></div>
<div id="nav2"><a name="top">&nbsp;</a></div>
<div id="masthead">
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td><h1>Blogmer beta 2</h1></td>
<td id="breadcrumb_right"><a href="table_of_content.html">Table of contents</a></td>
</tr>
</table>
</div>
<!-- END NAVIGATION -->


<!-- START BREADCRUMB -->
<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
<tr>
<td id="breadcrumb">
  <p><a href="http://speedovation.org/" >Speedovation</a> &nbsp;&#8250;&nbsp;
      <a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
    Table of contents</p>
  </td>

</tr>
</table>
<!-- END BREADCRUMB -->

<br clear="all" />


<!-- START CONTENT -->
<div id="content">


<h1>Sidebar_model</h1>

<p>Sidebar_model is used to get sidebar data(s)  like categories , recent post etc.</p>
<p>We'll study each of them with examples.</p>
<p class="important"><strong>Beta:</strong>&nbsp; This is an <kbd>Beta</kbd> model. It can be changed anytime.</p>
	
<p>Functions:</p>

<ul><li>archives_list()</li>
  <li>categories_list()</li>
  <li>recent_posts($posts=10)</li>
  <li>recent_comments($number=10)</li>
</ul>

<h2>Sidebar_model Function Reference</h2>

<h3>$this-&gt;Sidebar_model-&gt;archives_list()</h3>
<p>Generate &lt;ul&gt; based output.</p>
<ul>
  <li>id = 'archive_list'</li>
  <li>class='side_menu'</li>
  </ul>
<p>&lt;li&gt; some archive link &lt;/li&gt;</p>
<p>Generated output:</p>
<pre id="line73">&lt;ul class=&quot;sidemenu&quot; id=&quot;archive_list&quot;&gt;    
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;blog path/2008-10&quot;&gt;October 2008 &lt;/a&gt;&lt;/li&gt;
&lt;ul&gt;</pre>
<p class="important">Tip: You can define CSS using id and class .</p>
<h3>$this-&gt;Sidebar_model-&gt;categories_list()</h3>
<p>Generate &lt;ul&gt; based output.</p>
<ul>
  <li>id = 'categories_list'</li>
  <li>class='side_menu'</li>
</ul>
<p>Generated output:</p>
<pre id="line">&lt;ul class=&quot;sidemenu&quot; id=&quot;categories_list&quot;&gt;    <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;blog path/Default&quot;&gt;Default&lt;/a&gt;&lt;/li&gt;  <br />&lt;/ul&gt;  </pre>

<h3>$this-&gt;Sidebar_model-&gt;recent_posts($posts=10)</h3>
<p>Generate &lt;ul&gt; based output.</p>
<ul>
  <li>id = 'recent_posts'</li>
  <li>class='side_menu'</li>
</ul>
<p>Generated output:</p>
<pre id="line63">&lt;ul class=&quot;sidemenu&quot; id=&quot;recent_comments&quot;&gt;    
&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;blog path /title&quot;&gt;Title&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;blog path /title2&quot;&gt;Title 2 &lt;/a&gt;&lt;/li&gt;  
&lt;/ul&gt;  </pre>

<h3>$this-&gt;Sidebar_model-&gt;recent_comments($number=10)</h3>
<p>Generate &lt;ul&gt; based output.</p>
<ul>
  <li>id = 'recent_comments'</li>
  <li>class='side_menu'</li>
</ul>
<p>Generated output:</p>
<pre id="line2">&lt;ul class=&quot;sidemenu&quot; id=&quot;recent_comments&quot;&gt;    
&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;blog path /title#comments12&quot;&gt;comment text ... by &lt;strong&gt;name&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;blog path /title#comments12&quot;&gt;comment text ... by &lt;strong&gt;name&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;  
&lt;/ul&gt;</pre>
<h2>Final Collection</h2>
<p>
	<code>
    	$this->load->model('Sidebar_model');<br />
        $this->Sidebar_model->archives_list();<br />
        $this->Sidebar_model->categories_list();<br />
        $this->Sidebar_model->recent_posts($posts=10);
        <br />
        $this->Sidebar_model->recent_comments($number=10);    </code></p>

</div>
<!-- END CONTENT -->


<div id="footer">
<p><a href="#top">Top of Page</a></p>
<p><a href="http://speedovation.com">Speedovation</a> &nbsp;&middot;&nbsp; Copyright &#169; 2007-2008 &nbsp;&middot;&nbsp; <a href="http://speedovation.org/">Blogmer</a></p></div>

</body>
</html>